package com.qingzhuge.member.service;

import com.qingzhuge.member.dto.UserLoginResponse;
import com.qingzhuge.member.entity.SysMember;
import com.qingzhuge.member.entity.SysMemberThirdPartyAuth;
import com.qingzhuge.member.enums.EnumThirdOauthType;
import com.qingzhuge.service.IBasePkLongService;

import java.util.List;

/**
 * @author : zero.xiao
 * @description : 会员-第三方授权
 * @date :2018/6/8 0008 下午 15:04
 * @modified :
 * @since : 1.0.0
 */
public interface ISysMemberThirdOauthService extends IBasePkLongService<SysMemberThirdPartyAuth> {
    SysMemberThirdPartyAuth findByOpenId(String openId);

    List<SysMemberThirdPartyAuth> findByUid(Long uid);

    List<SysMemberThirdPartyAuth> findByUnionId(String unionId);

    SysMemberThirdPartyAuth findByOpenIdAndUserId(String openId, Long uid);

    SysMemberThirdPartyAuth findByTypeAndOpenId(EnumThirdOauthType type, String openId);

    SysMemberThirdPartyAuth findByTypeAndUserId(EnumThirdOauthType type, Long uid);

    UserLoginResponse login(SysMemberThirdPartyAuth oauth);

    SysMember updateMobile(Long id, String mobile);
}

